This invention relates generally to a virtual computer system, and more particularly to the allotment of bare computer resources to virtual computers.
A virtual machine system (hereinafter referred to as "VMS") makes it possible to run apparently simultaneously a plurality of operating systems (hereinafter referred to as "OS") 506, 507 on one bare machine (hereinafter referred to as "BM") as shown in the conceptual view of FIG. 1 of the accompanying drawings. To accomplish the system, a specific control program (such as a virtual machine monitor which will be hereinafter referred to as "VMM") 502 is prepared instead of directly disposing a base machine interface between BM 501 and each OS 506, 507, and this control program operates directly under BM 501 through the base machine interface 503 and provides a base machine interface 508 equivalent to the base machine interface 503 to each OS 506, 507. The machine which is conceptually produced when VMM 502 thus produces the base machine interface 508 is referred to as a virtual machine (hereinafter referred to as "VM"). In FIG. 1, VM 504 for which OS 506 operates and VM 505 for which OS 507 operates are shown, but an arbitrary number of VMs can of course be provided. VM 504 and VM 505 are changed over under the control of VMM 502 so that OS 506 and OS 507 operate apparently simultaneously.
OS 506 and OS 507 provide extended machine interfaces 513 and 514 for user programs (hereinafter referred to as "UP") 515, 516, 517 and 518, and extended machines (hereinafter referred to as "EM") 509-512 are formed. Each of EM 509 through 512 has the function of executing the processing in accordance with a processing request for a certain bulk function from a UP associated therewith (which request is called a supervisor call or a function call) inside its OS and the function of a base machine interface. OS 506 and OS 507 are different from each other, therefore, EMs belonging to the respective OSs (e.g., EMs 509 and 511) have mutually different functions.
As described above, the VMS enables a plurality of mutually different OSs to run apparently simultaneously on a single BM. As a result, the following effects can be expected.
(1) Debugging and test of a newly developed system can be made without stopping the service of the system which is under operation. PA0 (2) Since a plurality of mutually different OSs can be operated by a single BM, the utilization rate of hardware resources can be improved. PA0 (3) A computer system having a different architecture or system configuration from the BM can be virtually formed, so that the control program of a new machine or system can be carried out where hardware does not practically exist. PA0 (1) An overhead by the simulation of the privileged instruction. PA0 (2) An overhead by simulation of interruption. PA0 (3) An overhead by address conversion to support the virtual memory function. PA0 (4) An overhead for change-over service processing (dispatch processing) between VMs. PA0 "A Microprocessor for a Changing World: the PA0 "iAPX 86 Family Users Manual", Intel Japan: Document No. 205885J
Therefore, a specific control program VMM 502 exists in order to accomplish VMS. To operate VMs 504, 505 highly efficiently, VMM 502 divides the hardware resources of BM 501 time-wise and spatially by use of multi-programming techniques and allots them to each VM 504, 505. The instruction for operating the hardware resources is dealt with as a so-called "privileged instruction" in order to ensure the overall completeness of the system in VMS, and can be executed only in an operation mode called a "privileged mode".
Upon detecting that such a privileged instruction is generated from OS 506 or 507, VMM 502 interprets and executes the instruction by itself, and after completion of the instruction, returns the control to the operating OS. This processing is necessary in order to use in common the resources of BM 501 between VMs, and this processing time is an overhead inherent to the VMS. Since the common use of a main memory is realized by the technique of the virtual memory system, the time necessary for the address conversion also becomes an overhead. The primary overheads inherent to the VMS can be broadly classified as follows.
Attempts to reduce the overhead (3) described above are disclosed in Japanese Patent Laid-Open Nos. 23146/1975 and 212680/1982. One of the prior art techniques to reduce the overheads (1) and (2) is described in Japanese Patent Laid-Open No. 53749/1980. This prior art technique prepares operation register groups to be used by OSs on a VM separated from operation register groups to be used by the VMM inside the BM in order to reduce the overhead resulting from the retreat/recovery processing of the contents of the operation register groups involved in the processing of (1) and (2). However, the operation register group for VM is a single group used in common between VMs. Therefore, the overhead is left unreduced in connection with the processing (4) because the slave/restore processing of the content of the operation register group is necessary.
When an instruction which updates or refers to the content of a status register is issued from a program operating under each VM in the processing (1) described above, VMM executes substitution processing for the bare hardware operation inside a region for the status register of each VM formed in a control block for each VM by the VMM in a main memory. (This is called "simulation processing of the preferential instruction".) This simulation processing remains as the overhead.
Furthermore, when an interruption from an external unit occurs in the processing (2) described above the VMM immediately receives the interruption. Therefore, the interruption mask level number to the status register is set to the lowest order (0 value). Next, the VMM compares the interruption mask level number of the VM, which is disposed in the region of the status register of the VM formed in the control block of VM, with the interruption level number thus generated, in the same way as above (1). If the VM is found to be able to accept the interruption as a result of comparison, the simulation processing of the interruption operation is effected for that VM. If the VM is found to be unable to accept the interruption, an interruption information list is added to the control block of that VM. These processings are all executed by the VMM and remain as the overhead.
Conventionally, VMS has been examined in the field of large scale general-purpose computers or main frame processors. It is believed that the inventions disclosed in the afore-mentioned prior art references are also directed to large scale general-purpose computers. On the other hand, micro-computer technique has made a remarkable progress in recent years due to the remarkable progress in LSI technique with the consequence that so-called "personal computers" (hereinafter referred to as "PC") consisting of the combination of a micro-computer with peripheral units have come to gain wide applications. A large number of application programs have been developed for a variety of PCs, and the desire has occurred for the users of micro-computers to use attractive application programs that have been developed for other models. However, these application programs are prepared so as to operate under specific operating systems (OS). Particularly in the case of PCs in general, the applicability of an application program is generally limited to the microcomputer for which it is developed. Therefore, in order for use of such an application program to other PCs having different OSs, it is generally necessary to replace the OS or to change the OS-dependent portion of the application program in order to use the application program for PCs having different OSs, and they are extremely in inconvenient. As means for solving the problem, the employment of a VMS which enables a plurality of OSs to operate on a single bare machine would be extremely effective because the OS for a PC is by far smaller than that of mainframe OSs.
At present, however, PCs are not equipped with means for reducing the overheads of a VMM, as described above. An improved method of minimizing these overheads is indispensable for the application of the VMS for a PC. A typical micro-computer architecture used at present is disclosed in the references below, for example:
Motorola 6800" Computer, Vol. 12, pp. 43-51 (1979-2).